package com.bf.electroplating.pojo.enums;

import lombok.Getter;

@Getter
public enum RectificationStatusEnum {

    AWAIT("0", "待整改"),
    YET("1", "已整改"),
    AWAIT_OVER("2", "待整改(已超期)"),
    YET_OVER("3", "已整改(已超期)"),
    ;

    private final String code;
    private final String desc;

    private RectificationStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (RectificationStatusEnum item : RectificationStatusEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getDesc();
            }
        }
        return null;
    }

}
